/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import core.Doctor;
import core.User;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JTable;

/**
 *
 * @author Marcin
 */
public class PopUpListener_BadanieUSG extends MouseAdapter {
    private JCalendar cal;
   // private Doctor doctor;
    private User me;
    public PopUpListener_BadanieUSG (JCalendar cal, User me) {
        this.cal = cal;
        this.me = me;
    }
    @Override
    public void mousePressed(MouseEvent e) {
        if (e.isPopupTrigger()) {
            doPop(e);
        }
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        if (e.isPopupTrigger()) {
            doPop(e);
        }
    }
    
    private void doPop(MouseEvent e) {
            PopUpMenu_BadanieUSG menu = new PopUpMenu_BadanieUSG(cal,me);
            menu.show(e.getComponent(), e.getX(), e.getY());
    }
}
